#ifndef MOVINGPOLYGON_H
#define MOVINGPOLYGON_H

#include "polygon.h"
#include "vertex.h"
#include "IUpdateEvent.h"

class MovingPolygon: public Polygon, IUpdateEvent {
private:
	float d_angle; //angular velocity
	Vertex t; //velocity
public:
	MovingPolygon(const char* file_name);
	virtual void update(double time);
	void SetT(Vertex t);
	void SetdAngle(float a);
	virtual void collide(float j, Vertex n, Vertex p, Vertex cen);
	virtual Vertex getCenter();
	Vertex nthVertex(int n);
	void CalcRotMatrix();
	
	virtual Vertex GetV();
	virtual float GetV_angle();
};

#endif